import { EnumPlatform } from "@/models/enums/EnumPlatform";
import { CreateOrderResultVoT, WechatJsApiPayParams } from "@/models/order/CreateOrderResultVo";
import { http } from "@/utils/http";
/**
 * 
 * @param goodsId 商品Id
 * @param platform 平台
 * @returns 
 */
export async function buyProduct(goodsId: string, platform: EnumPlatform) {
    return await http.post<CreateOrderResultVoT<WechatJsApiPayParams>>("/api/order/buy-goods", { goodsId, platform });
}